﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using System.Data.SqlClient;


namespace Data
{

    public class Connect
    {
        public Connect()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public SqlConnection connect(String connstr)
        {
            String luismiranda = "Data Source=LUISMIRANDA-PC\\SQLEXPRESS;Initial Catalog=li4trabz;Integrated Security=True";
            String defaultstr = "Data Source=YOUR-DC30C31EAB;Initial Catalog=li4trabz;Integrated Security=True";
            String faria = "Data Source=OITENTA-PC\\SQLEXPRESS;Initial Catalog=li4trabz;Integrated Security=True";
            if (connstr.Length != 0)
                defaultstr = connstr;

            SqlConnection conn = new SqlConnection(luismiranda);


            conn.Open();

            return conn;
        }

    }

}